﻿@model KarReq.WebUI.Models.KaraokeTracksListViewModel

@{
    ViewBag.Title = "KarReq: Karaoke Database";
}

@{string previousArtist = "";}
@foreach (var p in Model.KaraokeTracks)
{
    if (previousArtist == p.Artist)
    {
        Html.RenderPartial("KaraokeTrackSummary", p);
    }
    else
    {
        Html.RenderPartial("KaraokeTrackSummary", p);
    }
    
    previousArtist = p.Artist;
}

<div class="pager">
    @Html.PageLinks(Model.PagingInfo, x => Url.Action("List",
        new { page = x, category = Model.CurrentCategory }))
</div>